package com.example.administrator.im.ui.activity;

import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Color;
import android.graphics.drawable.Drawable;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.DataSource;
import com.bumptech.glide.load.engine.GlideException;
import com.bumptech.glide.request.RequestListener;
import com.bumptech.glide.request.target.Target;
import com.example.administrator.im.R;

import java.io.File;

public class ShowImageActivity extends AppCompatActivity implements View.OnClickListener{

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        View decorView = getWindow().getDecorView();
        decorView.setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);
        getWindow().setStatusBarColor(Color.TRANSPARENT);

        setContentView(R.layout.activity_show_image);

decorView.setOnClickListener(this);
        String url = "";
        Intent intent = getIntent();
        if (intent != null) {
            url = intent.getStringExtra("imgPath");
        }
        ImageView iv_show = (ImageView) findViewById(R.id.showImage);
        iv_show.setImageBitmap(BitmapFactory.decodeFile(url));


    }

    @Override
    public void onClick(View v) {
        Log.e("aaaa",v.getId()+"1111");
    }
}
